<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<base href="${BaseContext }">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加更新客房</title>
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.js"></script>
</head>
<body>

<jsp:include page="../headJsp.jsp"></jsp:include>


<div class="jumbotron" style="padding-top: 55px;padding-bottom: 15px;">
		<div class="container">
			<c:if test="${empty customer.id}">
				<h2>添加客人信息</h2>
			</c:if>
			<c:if test="${not empty customer.id}">
				<h2>更新客人信息</h2>
			</c:if>
		</div>
	</div>


	<div class="container" style="margin-top: 20px;">

		<form id="form" class="form-horizontal" action="${pageContext.request.contextPath}/customer/addCustomer.do?strId=${customer.id}"
			method="post" enctype="multipart/form-data">
			<input value="${customer.id}" name="strId" type="hidden" >
			<div class="form-group">
				<label  class="col-sm-2 control-label">姓名</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="name"
						 placeholder="姓名" value="${customer.name}">
				</div>
			</div>

			<div class="form-group">
				<label  class="col-sm-2 control-label">房间号</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="roomid"
						   placeholder="房间" value="${customer.roomid}">
				</div>
			</div>

			<div class="form-group">
				<label  class="col-sm-2 control-label">身份证</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="idcard"
						   placeholder="身份证" value="${customer.idcard}">
				</div>
			</div>

			<div class="form-group">
				<label  class="col-sm-2 control-label">年龄</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="age"
						 placeholder="年龄" value="${customer.age}">

				</div>
			</div>
			<div class="form-group">
				<label  class="col-sm-2 control-label">性别</label>
				<div class="col-sm-10">
					男<input type="radio" name="sex" value="男" checked>&nbsp;
					女<input type="radio" name="sex" value="女">
				</div>
			</div>
			<div class="form-group">
				<label  class="col-sm-2 control-label">手机号</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="tel"
						 placeholder="手机号" value="${customer.tel}">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 control-label">入住时间</label>
				<div class="col-sm-10">
					<input type="date" class="form-control" name="starttime"
						placeholder="客户入住时间"  value="${customer.starttime}"/>

				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">客户离开时间</label>
				<div class="col-sm-10">
					<input type="date" class="form-control" name="endtime"
						placeholder="离开时间"  value="${customer.endtime}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">备注</label>
				<div class="col-sm-10">
					<textarea name="notes" style="width: 950px;height: 100px">
						${customer.notes}
					</textarea>

				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn  btn-primary">保存</button>
					<a href="${pageContext.request.contextPath}/customer/list.do" class="btn btn-default">返回列表</a>
				</div>
			</div>
		</form>

	</div>
</body>
</html>